<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
	<script type = "text/javascript">
		function moveLeft() {	
			if (document.getElementById("outer").scrollLeft < 200) {
				document.getElementById("outer").scrollLeft += 10;
			} else {
				clearInterval(end);
				endf();
			}			
		}
		
		function moveRight() {
			if (document.getElementById("outer").scrollLeft >= 10) {
				document.getElementById("outer").scrollLeft -= 10;
			} else {
				clearInterval(start);
				startf();
			}
		}
		
		function startf() {			
			end = setInterval('moveLeft()',100);		
		}
		
		function endf() {			
			start = setInterval('moveRight()',100);
		}
	</script>
</head>

<body onload = "startf()">	
	<div id = "outer" style = "width:500px; height:100px; left:100px; background-color:red; position:absolute;overflow:hidden">
		<div style = "width:700px; height:100px; top:50px; position:absolute;">
			ABDSF;KLOJJLDGFHGKLJDGFKLDFGLGHGKJDFHGGDFHGDFGJYIOHEIO[HDASUFGDSFHDSOFH
		</div>
	</div>
</body>

</html>